package com.zhiying.mybatis;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import com.zhiying.domain.Role;
import com.zhiying.domain.RoleMenu;
import com.zhiying.domain.UserVO;
import com.zhiying.page.PageInfo;

public interface UserRoleMapper {

	List<Role> selectRoleListInfo(@Param("pageInfo")PageInfo pageInfo, @Param("search")String search,RowBounds rowBounds);
    //角色信息查询
	int selectRoleCount(@Param("search") String search);
	//查询角色信息的个数
	int updatestatusByid(@Param("role")Role role);
	//修改角色信息
	Role selectRoleInfoById(@Param("RoleId")Long roleId); 
    //根据角色id查询角色信息
	int selectCmsRoleByRoleId(@Param("roleId")int roleId);
	//根据角色id查询该角色下是否存在用户
	int deleteByRoleId(@Param("roleId") int roleId);
	List<Role> listByUserId(@Param("userId")Long userId, @Param("status")Integer status);

    int updateById(@Param("role") Role role);
    
    int delete(@Param("roleMenu")RoleMenu roleMenu);
    
    List<UserVO> listByRoleId(@Param("roleId")int roleId,@Param("pageInfo")PageInfo pageInfo, @Param("search")String search,RowBounds rowBounds);

    int selectRoleCountByRoleId(@Param("roleId")int roleId,@Param("search")String search);
}
